home *** CD-ROM | disk | FTP | other *** search
- #trace on
- #
- # set up some strings for dialling up
- #
- if ![load $number]
- if [query $number "Enter your dial up phone number"]
- save $number
- end
- end
- if ![load $lusername]
- if [query $lusername "Enter your login username"]
- save $lusername
- end
- end
- if ![load $lpw]
- if [query $lpw "Enter your login password"]
- save $lpw
- end
- end
- if ![load $modemsetup]
- if [query $modemsetup "Enter your modem setup string"]
- save $modemsetup
- end
- end
-
- if ![load $dial_prefix]
- if [query $dial_prefix "Enter your modem prefix string"]
- save $dial_prefix
- end
- end
-
- # $modemsetup = "&f"
- $userprompt = "gin:"
- $passprompt = "word:"
- $hostprompt = "e:"
- $helpprompt = "ame:"
- %attempts = 10
- #
- #
- #----------------------------------------------------------
- #
- # initialize modem
- #
- output "atz"\13
- if ! [input 10 OK\n]
- display "Modem is not responding"\n
- abort
- end
- #
- # setup our modem commands
- #
- output $modemsetup\13
- input 10 OK\n
- #
- # send phone number
- #
- %n = 0
- repeat
- if %n = %attempts
- display "Too many dial attempts"\n
- abort
- end
- output "atdt"$dial_prefix$number\13
- %ok = [input 60 CONNECT]
- %n = %n + 1
- until %ok
- input 10 \n
- #
- # wait till it's safe to send because some modem's hang up
- # if you transmit during the connection phase
- #
- #wait 30 dcd
- #
- # now prod the terminal server
- #
- output \13
- #
- # portal through compuserve
- input 30 $hostprompt
- output "+"\13
- input 30 $helpprompt
- output "pinip,li00"\13
- #
- #
- # wait for the username prompt
- #
- input 30 $userprompt
- output $lusername\13
- #
- # and the password
- #
- input 30 $passprompt
- output $lpw\13
- #
- # we are now logged in
- #
- display "Connected to Portal"\13
- sleep 6
- end
- #
- # now we are finished.
- #